home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
tutor
/
dosguide.exe
/
HELPDOS.ZIP
/
DIR.HLP
< prev
next >
Wrap
Text File
|
1987-05-18
|
5KB
|
117 lines
------------------------- DIR - Internal DOS Command -------------------------
DIR displays directory information for a file or files. The disk volume
identification, directory path, and number of free bytes on the disk are
displayed. The name of each file matching the specified criteria is
displayed along with its size and the time and date it was last written.
FORMAT: DIR [d:][path][filename[.ext]][/P][/W]
REMARKS:
d: - the drive containing the directory to be displayed. If omitted,
the default drive is assumed.
path - the directory to be searched. If omitted, the current directory
is assumed.
filename - the filename of the file or files whose directory information is
to be displayed. Global characters (* and ?) are allowed.
.ext - the filename extension of the file or files whose directory
information is to be displayed. Global characters (* and ?) are
allowed.
/P - Pause. Halts the display when the screen is full. Pressing any
key continues the display.
/W - Width. Gives a wide display, listing only the directory names and
filenames/extensions. Each line will display five names.
If no filename/extension is given, DIR assumes all files (same as *.*).
Hidden files, such as DOS system files, will not be listed.
The following is an example of a DIR display. The line numbers are added for
reference in the explanation below:
1 Volume in drive A is MYDISK
2 Directory of A:\BUDGET
3 FILE1 DAT 504 4-15-85 10:22a
4 1 File(s) 320312 bytes free
Line 1 - the drive letter and the disk volume label.
Line 2 - the directory path.
Line 3 - the filename, extension, file size (in bytes), and the date and
time the file was created or last written.
Line 4 - the number of files in the directory display, and the total bytes
available for use on the entire disk.
EXAMPLES:
Display directory information for all files in the current directory of the
default drive:
DIR
Display directory information for all files in the current directory of drive B
and halt the display when the screen is full. The default drive is A:
DIR B:/P
Display directory information for all files in the BUDGET directory on the
default drive that have an extension of .DAT. The current directory is the root
directory. BUDGET is a subdirectory of the root directory:
DIR BUDGET\*.DAT
Display directory information for all files in the DATA directory on the default
drive. DATA is a subdirectory of BUDGET, which is a subdirectory of the root
directory. The directory path begins with \ (the root directory), so that the
command will work correctly regardless of what directory is current.
DIR \BUDGET\DATA
SPECIAL USES of DIR:
The following examples use "redirection and piping" to perform special
functions. Note that the commands MORE, FIND and SORT are external DOS
commands. The command files for these commands must be in the current directory
of the default drive, or, you must have previously issued a PATH command to tell
DOS the drive and directory where the command files can be found. For brevity,
the examples below do not specify drives letters, paths or filenames. You may
include them, as needed, when using the following forms.
DIR > PRN - print directory listing.
DIR > DIRFILE - write directory listing to file DIRFILE.
DIR >> DIRFILE - append directory listing to file DIRFILE.
DIR | SORT - display directory listing sorted by filename/extension.
DIR | SORT /+14 - display directory listing sorted by file size.
DIR | SORT /R/+14 - display directory listing sorted by descending file
size. Largest files are listed first.
DIR | SORT /+10 - display directory listing sorted by filename extension.
DIR | SORT | MORE - display directory listing sorted by filename/extension
and halt when screen is full.
DIR | SORT > PRN - print directory listing sorted by filename/extension
DIR | SORT > DIRFILE - write directory listing sorted by filename/extension to
file DIRFILE
DIR | FIND "5-31-85" - display directory listing for files that were written on
5/31/85.
DIR | FIND "5-31-85" | SORT > PRN - print directory listing, sorted by
filename/extension, for files that were written on
5-31-85.